package cn.fzkj.project.common.controller;

import cn.fzkj.common.ResultVO;
import cn.fzkj.framework.security.LoginBody;
import cn.fzkj.framework.security.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("login")
    public ResultVO login(@RequestBody LoginBody loginBody){
        return loginService.login(loginBody.getUsername(),
                loginBody.getPassword(),loginBody.getCode(),loginBody.getUuid());
    }

}
